function createUser(loginId, loginPwd, nickName) {
    return {
        loginId,
        loginPwd,
        nickName,
        //如果这样子写，this指向createUser（）的this，createUser()直接调用指向window
        sayHello: () => {
            console.log("loginId", this.loginId, "nickname", this.nickName)
        },
        id: Math.random()
    }
}
const u = createUser("abc", "123", "aaa");
u.sayHello();
